home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-24 | 10.2 KB | 226 lines | [TEXT/EMAC] |
- This file accompanies an Apple Macintosh port of GNU Emacs 18.59.
- Here are some things to remember:
-
- 1) This document describes differences between GNU Emacs on the
- Macintosh, and GNU Emacs on Unix. It is not an introduction to Emacs.
- Type control-H t in Emacs to get an introduction.
-
- 2) Emacs expects lines of text to end with '\n'. The convention on
- the Macintosh is that lines of text end with '\r'. To work around
- this, Emacs when reading files converts all '\r' characters to '\n'.
- Similarly, when writing files Emacs converts all '\n' characters to
- '\r'. To accommodate this translation, and to allow Emacs to read
- other unconventionally formatted files, the following is done when
- reading any file:
-
- a) If the file name ends with .elc or .bin, no translation is done.
- b) Otherwise, Emacs examines sequentially the first 200 bytes of
- the file. If a '\r' is found before a '\n', then the file will
- be translated. If a '\n' is found before a '\r', then the file
- will not be translated.
- c) If neither a '\r' nor a '\n' is found, the file is translated.
- This way, initially empty files will be translated and thus
- conventional when later made non-empty.
-
- The author of this port welcomes better ideas on heuristics that
- determine the need for translation. See the final item below.
-
- 3) The Modifier Key Nightmare: A fully functional Emacs implementation
- uses a modifier key called meta. There is no key named meta on the
- Macintosh keyboard. There is an option key, and many users of Emacs
- prefer to use the option key as a meta key. Some users prefer not to
- change the function of any of the modifier keys at all. Others prefer
- to use the larger command key as a meta key. If any key is changed to
- function as meta, there remains the question, how can the function of
- that lost modifier key be refound when necessary.
-
- The solution implemented now is that the functions of all five
- modifier keys, control, option, command, shift, and caps-lock, are
- configuable. By default, the function of these keys in Emacs is just
- like that of any other Macintosh program.
-
- Before you make any changes, you need to understand that the default
- configuration of the Macintosh operating system makes use of seven
- different combinations of modifier keys. Each has a different effect
- on the keyboard, observable with the Key Caps desk accessory:
-
- shift,
- control,
- option,
- caps-lock,
- shift option,
- command option, and
- caps-lock option.
-
- A completely functional Emacs requires six more combinations:
-
- shift control,
- control option,
- control shift option,
- meta,
- shift meta, and
- control meta.
-
- The combinations control option and control shift option are not
- required by American keyboards, but some foreign keyboards use them.
-
- By default, this Emacs provides the seven standard combinations
- faithfully, plus the three additional combinations that do not require
- meta. The three meta combinations are not provided. You can change
- this and provide yourself with a meta key by using the “Change
- modifier keys” menu item in the Special menu. The settings you choose
- are saved in a preferences file. If you decide to let the option key
- function as meta, you need to redefine the option modifier. One
- suggestion provided in the dialog box is to let command-option be
- option. You could also leave option completely undefined, by chosing
- no modifier keys for it.
-
- If you decide to provide yourself a meta key, note that in other
- implementations of Emacs the meta key sets the high bit of any
- character typed. On the Macintosh, the meta key prefixes each
- character typed with an escape character. The resulting behavior is
- slightly different at times.
-
- The option-is-meta variable once provided for modifying keyboard
- behavior is now obsolete.
-
- 4) The author's favorite Unix utilities have been ported in addition
- to Emacs. These are ls, grep, ispell, and lpr. Try them using dired,
- M-x grep, M-x ispell, M-x print-buffer, and M-x print-region. You
- should uncomment the appropriate lines in •emacs to use ispell. (The
- program sh is included so that wildcard characters used in arguments
- to ls, grep, and lpr can be expanded in the normal way.) The programs
- chown, chmod, chgrp, mkdir, and rmdir are included for use with dired.
- The program wakeup is included for the display-time function.
-
- 5) Slashes in filenames within the Finder are translated to colons
- when referenced in Emacs. Colons in filenames within Emacs are
- translated to slashes when referenced by the Finder. Similarly, a '.'
- prefix in filenames within Emacs is translated to a '•' when
- passed to the Finder, and a '•' prefix in filenames within the
- Finder are translated to a '.' in Emacs. The dot-bullet translation
- is not quite as clean as the colon-slash translation, but it seems to
- be the solution that leaves the fewest problems.
-
- 6) Emacs is System 7 dependent. At one point Emacs required a 68020
- processor, but this is no longer true.
-
- 7) Emacs has a 25 bit address space. That's 32 megabytes. If you
- have a Macintosh with more memory than that, Emacs will have to be
- deliberately loaded into low memory, through some kludge not yet
- developed.
-
- 8) Keep your •emacs file in your home directory. On the Macintosh the
- name •emacs is used instead of .emacs, because other programs have
- problems with filenames that begin with a period. The character • is
- typed option-8. If you use option as meta, you must type
- option-command-8.
-
- 9) There should be a folder named “directories” in the same folder
- as Emacs. The use of ~ in directory names is as follows:
- a) The directory “~emacs” is, by definition, the same one that the
- Emacs program is in.
- b) If in the folder “directories” is an alias called “home”,
- then ~/ is the folder targeted by that alias. Otherwise ~/
- is the same as ~emacs.
- c) For any other directory name ~dir, the folder understood
- is the target of the alias “dir” in the “directories”
- folder.
-
- 10) For Emacs elisp hackers only: To start Emacs without loading the
- dumped elisp data, hold the shift key down when starting. To rebuild
- the database, hold the option key down when starting. It is a good
- idea to save a copy of Emacs before rebuilding its database, because
- Emacs saves its dumped data directly into its own resource fork.
-
- 11) If Emacs suddenly quits on you, perhaps during garbage collection
- or byte-compiling, and perhaps with an error of ID 28, try using the
- "Set stack size..." menu item to increase the stack size. Sometimes
- the use of large windows on large screens with many lines of text
- requires larger amounts of stack space.
-
- 12) Hackers may like working with the files in the directory lisp:mac.
- But remember this warning: If you start using the Macintosh Toolbox,
- you can easily, and will most likely, crash Emacs, and the entire
- machine, losing all changes in any open documents in Emacs and other
- programs.
-
- 13) The commands in the Edit menu do the following:
-
- Undo calls the elisp function undo. Unlike what is typical
- on the Macintosh, successive undo's will undo more and more
- of what has been changed in the buffer. If you move the
- cursor after successive undo's, the undo command will then
- begin to successively redo what has been undone.
-
- Cut copies the region of the current buffer to the buffer
- named *clipboard*, and also copies that region to the
- System Scrap. Then kill-region, more familiarly known as
- control-W, is called.
-
- Copy is just like Cut, except that copy-region-as-kill,
- more familiarly know as ESC-W, is called instead of
- kill-region.
-
- Paste insures that the buffer named *clipboard* contains
- the contents of the Macintosh System Scrap, then inserts
- the contents of the buffer *clipboard* into the current
- buffer. It does not call the elisp function yank, known
- also as ESC-Y.
-
- Clear calls delete-region, and does nothing with the
- Macintosh System Scrap.
-
- These definitions are in lisp:mac:menu-install.el, and can be changed.
- The clipboard can be examined in the buffer named *clipboard*. By
- default on extended keyboards, the keys labeled undo, cut, copy, and
- paste do the expected things.
-
- 14) Emacs can only use fixed-width fonts.
-
- 15) Not all the elisp files included are immediately useful. The
- files dealing with mail are not working, for example. They are
- included for others who have a mail program and might try to make them
- work.
-
- 16) Emacs handles correctly pathnames with aliases used as
- directories. The pathname /HardDrive/Folder/AliasedFolder/File works.
- But pathnames with the final filename an alias work differently. If
- /HardDrive/Folder/Alias is an alias to say /HardDrive/File, then you
- can open and edit that file using the alias. When you save it,
- however, Emacs will first copy /HardDrive/File to
- /HardDrive/Folder/Alias~, then create rewrite /HardDrive/File. This
- may or may not be what you want. This is similar to what Emacs does
- under Unix with symbolic links.
-
- 17) In dired, use the command 'O', which runs chown, to change the
- creator of a file. Use the command 'G', which runs chgrp, to change
- the type of a file. Use the command 'M', which runs chmod, to set the
- mode bits of a file. Only the write permission of files is affected;
- the file is effectively locked or unlocked.
-
- 18) In TeX mode, C-c C-b (TeX-buffer), and C-c C-r (TeX-region) have
- been rewritten to send the appropriate Apple events to Textures. The
- version of Textures required is 1.6.2. You will need to edit the
- •emacs file to load the appropriate lisp code.
-
- 19) Mouse support is at the moment limited to this: Clicking sets
- point, and shift-clicking sets mark.
-
- 20) You can change the fonts available in the Font menu item by
- setting the variable fixed-width-fonts in your •emacs file. The
- default value is ("Courier" "Monaco").
-
- 21) You can change the definitions of the keys on the numeric keypad,
- the keys F1-F15, the cursor keys, and the keys labeled help, home,
- page up, del, end, and page down. See the file
- lisp/term/Macintosh-win.el.
-
- 22) The principal ftp site for the Macintosh port of Emacs is
- ftp.cs.cornell.edu, directory pub/parmet. The sources are on
- this site.
-
- 23) This port is now fairly well tested. Still, save often. Send bug
- reports, suggestions, and comments to the author of the port at
- parmet@cs.cornell.edu.
-